Music Object Extension - Song Info
|
|
The Song Info extension provides additional features for displaying an RMF file's copyright information in a pop-up window. This extension is also useful in that it allows you to conveniently display certain song information fields that may not be displayed in the Beatnik Player's standard "Copyright Information" window, such as the GENRE, SUBGENRE, TEMPO DESCRIPTION, ORIGINAL SOURCE, PLAYLENGTH, and SIZE fields.
|
What's New in the Latest Version
|
There is a dedicated version history for this extension, where you will be able to find out about the new features and possible issues with the most recent version. The version history for this extension is independent of the version history for the core Music Object API.
To get the "music-object-x-song-info.js" JavaScript file that implements this extension, simply right-click on this link (click-and-hold for Mac users). Then, from the menu that pops up, select the 'Save Link As...' or 'Save Target As...' option and save the file as "music-object-x-song-info.js" into an appropriate folder of the local copy of your Web site.
In case you have problems saving the file using the above link, the "music-object-x-song-info.js" file can also be found inside the documentation's "javascript" folder, along with the "music-object.js" file.
In order to use this extension, the following JavaScript file(s) must first be sourced in...
- music-object.js (version 3.3.0 or higher)
For more information on using extensions, consult the section About Music Object Extensions.
| Name |
Short Description |
| Instance Methods |
| showSongInfo |
Lets you display the copyright and other information for an RMF file that is loaded into the Music Object instance. |
| Static Properties |
| Music.songInfoFieldNameStyle |
A string variable, specifying the default value that should be used for the SongInfoFieldNameStyleSTR parameter, if this parameter is not specified when calling the showSongInfo instance method. |
| Music.songInfoFields |
A string variable, specifying the default value that should be used for the SongInfoFieldsSTR parameter, if this parameter is not specified when calling the showSongInfo instance method. |
| Music.songInfoFieldValueStyle |
A string variable, specifying the default value that should be used for the SongInfoFieldValueStyleSTR parameter, if this parameter is not specified when calling the showSongInfo instance method. |
| Music.songInfoImageURL |
A string variable, specifying the default value that should be used for the SongInfoImageUrlSTR parameter, if this parameter is not specified when calling the showSongInfo instance method. |
| Music.songInfoWindow |
An object reference, being a handle to the song info window that is popped open by the showSongInfo instance method. |
| Common Parameters |
| SongInfoFieldsSTR |
A string, specifying the song info fields that should be displayed, as well as the order in which they should appear. |
|
|
The showSongInfo instance method lets you display the copyright and other information for an RMF file that is loaded into the Music Object instance
|
showSongInfo (
SongInfoFieldsSTR ,
SongInfoImageUrlSTR ,
SongInfoFieldNameStyleSTR ,
SongInfoFieldValueStyleSTR
)
|

- SongInfoFieldsSTR
Lets you specify the song info fields that should be displayed, as well as the order in which they should appear. For more information on the valid field names that can be specified, see the dedicated section for the SongInfoFieldsSTR parameter.
- SongInfoImageUrlSTR
Lets you specify the URL of an image that should be displayed as the background for the song info window.
- SongInfoFieldNameStyleSTR
Lets you specify a style definition for customizing the display of field names in the song info window.
- SongInfoFieldValueStyleSTR
Lets you specify a style definition for customizing the display of field value in the song info window.

- When a value of null is specified for the SongInfoFieldsSTR parameter, then the value of the Music.songInfoFields static property is used for this parameter.
- When a value of null is specified for the SongInfoImageUrlSTR parameter, then the value of the Music.songInfoImageURL static property is used for this parameter.
- When a value of null is specified for the SongInfoFieldNameStyleSTR parameter, then the value of the Music.songInfoFieldNameStyle static property is used for this parameter.
- When a value of null is specified for the SongInfoFieldValueStyleSTR parameter, then the value of the Music.songInfoFieldValueStyle static property is used for this parameter.

- showSongInfo ( SongInfoFieldsSTR , SongInfoImageUrlSTR , SongInfoFieldNameStyleSTR )
When no SongInfoFieldValueStyleSTR parameter is specified, then the value of the Music.songInfoFieldValueStyle static property is used for this parameter.
- showSongInfo ( SongInfoFieldsSTR , SongInfoImageUrlSTR )
When there is also no SongInfoFieldNameStyleSTR parameter specified, then the value of the Music.songInfoFieldNameStyle static property is used for this parameter.
- showSongInfo ( SongInfoFieldsSTR )
When there is also no SongInfoImageUrlSTR parameter specified, then the value of the Music.songInfoImageURL static property is used for this parameter.
- showSongInfo ( )
When there is also no SongInfoFieldsSTR parameter specified, then the value of the Music.songInfoFields static property is used for this parameter.
The Music.songInfoFieldNameStyle static property is s string variable, specifying the default value that should be used for the SongInfoFieldNameStyleSTR parameter, if this parameter is not specified when calling the showSongInfo instance method.
The default value for the Music.songInfoFields property is "text-align: right; color: #000; font-family: Arial, Helvetica, Verdana; font-size: 10pt; font-weight: bold;".
The Music.songInfoFields static property is a string variable, specifying the default value that should be used for the SongInfoFieldsSTR parameter, if this parameter is not specified when calling the showSongInfo instance method.
The default value for the Music.songInfoFields property is "TITLE, PLAYLENGTH, SIZE, COMPOSER, COPYRIGHT, PERFORMER, PUBLISHER, USE, LICENSEE, TERM, EXPIRATION, NOTES".
The Music.songInfoFieldValueStyle static property is a string variable, specifying the default value that should be used for the SongInfoFieldValueStyleSTR parameter, if this parameter is not specified when calling the showSongInfo instance method.
The default value for the Music.songInfoFields property is "color: #000; font-family: Arial, Helvetica, Verdana; font-size: 10pt;".
The Music.songInfoImageURL static property is a string variable, specifying the default value that should be used for the SongInfoImageUrlSTR parameter, if this parameter is not specified when calling the showSongInfo instance method.
The Music.songInfoWindow static property is an object reference, being a handle to the song info window that is popped open by the showSongInfo instance method.
| |
| CATEGORY |
Parameter |
| Type |
string |
| | |
|
The SongInfoFieldsSTR parameter is a string, specifying the song info fields that should be displayed, as well as the order in which they should appear.
The SongInfoFieldsSTR parameter consists of a series of song info field names seperated by commas (','). The order in which the field names appear determines the order in which they are displayed in the window that is popped open by the showSongInfo instance method.
For the SongInfoFieldsSTR parameter, the following info field names can be specified...
- TITLE
Corresponds to the "Song Title" field in the Beatnik Player's "Copyright Information" window and the "Title" field in the Beatnik Editor's "Song Info" window.
- COMPOSER
Corresponds to the "Composer(s)" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- COPYRIGHT
Corresponds to the "Copyright" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- PERFORMER
Corresponds to the "Performed By" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- PUBLISHER
Corresponds to the "Publisher Contact Information" field in the Beatnik Player's "Copyright Information" window and the "Publisher Contact" field in the Beatnik Editor's "Song Info" window.
- USE
Corresponds to the "Use of License" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- LICENSEE
Corresponds to the "Licensed To URL" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- TERM
Corresponds to the "License Term" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- EXPIRATION
Corresponds to the "Expiration Date" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- NOTES
Corresponds to the "Composer Notes" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- INDEX
Corresponds to the "Index Number" field in the Beatnik Player's "Copyright Information" window and the Beatnik Editor's "Song Info" window.
- GENRE
Corresponds to the "Genre" field in the Beatnik Editor's "Song Info" window (not displayed in the Beatnik Player's "Copyright Information" window).
- SUBGENRE
Corresponds to the "Sub Genre" field in the Beatnik Editor's "Song Info" window (not displayed in the Beatnik Player's "Copyright Information" window).
- TEMPO DESCRIPTION
Corresponds to the "Tempo Description" field in the Beatnik Editor's "Song Info" window (not displayed in the Beatnik Player's "Copyright Information" window).
- ORIGINAL SOURCE
Corresponds to the "Original Source" field in the Beatnik Editor's "Song Info" window (not displayed in the Beatnik Player's "Copyright Information" window).
- PLAYLENGTH
The duration of the song, as returned by the getPlayLength instance method.
- SIZE
The actual filesize of the currently loaded file, as returned by the getFileSize instance method.

- Song info field names are not case-sensitive.
- Methods using this parameter: showSongInfo.